import sys
from downloader import download_akc


def main():
    while True:
        course_num = input('请输入课程代码以空格分隔（如：2919 2350）或 q 退出>>>')
        if course_num == 'q':
            sys.exit(0)
        elif len(course_num) > 0:
            for course_item in course_num.split(' '):
                download_akc(course_item)
        else:
            pass


if __name__ == '__main__':
    main()
